Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Case study on reconstructing infections for COVID and Ebola #545

Closed

Conversation

adamkucharski
Copy link
Contributor

@adamkucharski adamkucharski commented Feb 13, 2024

This is a draft PR with a vignette illustrating how to reconstruct infections from delayed outcomes for COVID and Ebola. This code is likely to be streamlined further with incoming functionality to epiparameter and EpiNow2 – notes are given in bold in the .Rmd. There is also an issue with current estimation of infections for Ebola, which are estimated to exponential but should be a small outbreak – would value comments/suggestions!

Subsequent note: I explored the issue of mis-estimation of infections in more detail. Initially wondered if it might be a period with zero initial cases in the dataset, but omitting these did not fix the problem. So instead compared the $R_t$ model with the rt=NULL non-mechanistic version.

This is the (erroneous) estimate I got with rt=NULL:
rt_null

And the plausible version with $R_t$ implementation:
rt_fitted

I have updated the vignette to include my understanding of why it might be preferable (estimation using low counts works better with a more constrained model process), but there may well be a better explanation. In any case, probably useful to show users a case study both with large counts (COVID) and small counts (Ebola) to demonstrate functionality – we use similar examples in the {cfr} package to show advantages/limitations of different approaches.

@adamkucharski adamkucharski changed the title Estimating infections Case study on reconstructing infections for COVID and Ebola Feb 13, 2024
Use rt implementation and add explanation about low counts.
@sbfnk sbfnk force-pushed the main branch 2 times, most recently from 7568882 to 23229a8 Compare February 19, 2024 20:09
@sbfnk
Copy link
Contributor

sbfnk commented Mar 4, 2024

Thanks for this PR, @adamkucharski! Really nice to see this application, and great to surface this use case of the package model.

In terms of where this sits it might be best to host it outside the package and add it to the repository of case studies so as not to keep the package documentation maintainable and not to add unneeded dependencies here: in this case it would we'd have to add dplyr , httr, cfr, and epiparameter only for this vignette in order to pass checks.

With this in mind I'll close the PR and invite you to either put it in its own repository (which would enable full reproducibility with e.g. renv) or a gist and then open a new PR to add it to the case studies. If anyone disagrees with this approach please feel free to re-open.

@sbfnk sbfnk closed this Mar 4, 2024
@adamkucharski
Copy link
Contributor Author

That sounds sensible (hadn't appreciated the dependency headaches that vignette-only packages would cause). Will look at moving to separate repo, and updating with the new interoperability functionality coming down the line for epiparameter/EpiNow2.

In meantime, would be interested to hear thoughts on the rt=NULL issue for small datasets above.

@sbfnk
Copy link
Contributor

sbfnk commented Mar 13, 2024

In meantime, would be interested to hear thoughts on the rt=NULL issue for small datasets above.

Opened an issue in #611 and will propose a fix.

For what it's worth in this case the problem can also be fixed by using a zero-centered prior (backcalc = backcalc_opts(prior = "none")) instead of one centered around shifted reported cases (which is more relevant when trying to use for real-time estimates).

@adamkucharski
Copy link
Contributor Author

For reference, have moved draft to this branch: https://github.com/epiverse-trace/howto/tree/additional-inference

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants